package pc29;

import java.util.Scanner;
public class J12SungJuck {
	public static void main(String[] args){
		
		SungJuck h1 = new SungJuck();
		h1.kor = 10;
		h1.eng = 10;
		h1.mat = 10;
		
		SungJuck h2 = new SungJuck();
		h2.kor = 20;
		h2.eng = 20;
		h2.mat = 20;
		
		SungJuck h3 = new SungJuck();
		h3.kor = 30;
		h3.eng = 30;
		h3.mat = 30;
		
		System.out.println(h1.gettot());
		System.out.println(h2.gettot());
		System.out.println(h3.gettot());
		
		System.out.println(h1.getavg());
		System.out.println(h2.getavg());
		System.out.println(h3.getavg());

	} // 메인이고
} // 클래스고

class SungJuck{
	String name;
	int kor;
	int eng;
	int mat;
	int tot;
	double avg;
	
	int gettot(){
		tot=kor+eng+mat;
		return tot;
	}
	double getavg(){
		avg=tot/3;
		return avg;
	}
}
